//
//  cardtest1.c
//  Dominion
//
//  Eric Hook
//  hooke@onid.orst.edu
//  CS362 Winter 2014
//

#include "dominion.h"
#include "dominion_helpers.h"
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include "rngs.h"

int seed = 1000;
int k[10] = {adventurer, council_room, feast, gardens, mine, remodel, smithy, village, baron, great_hall};

void testCardEffectVerifyVillageCardNumActionsIsIncrementedByTwo() {
    int result = 0;
    int card = village;
    int bonus = 0;
    int expectedNumActions = 3;     //+2 Actions
    int actualNumActions = 0;       // initialized
    struct gameState G;
    
    printf ("TESTING: int cardEffect(int card, int choice1, int choice2, int choice3, struct gameState *state, int handPos, int *bonus) : cardTest1.c.\n");
    
    memset(&G, 23, sizeof(struct gameState));       // clear the game state
    result = initializeGame(2, k, seed, &G);
    assert(result == 0);  // validate that the game was inititalized correctly
    
    cardEffect(card, 1, 1, 1, &G, 1, &bonus);
    actualNumActions = G.numActions;

    printf("actualNumActions = %d, expectedNumActions %d\n", actualNumActions, expectedNumActions);
    assert(expectedNumActions == actualNumActions);

    printf ("!!! PASS: int cardEffect(int card, int choice1, int choice2, int choice3, struct gameState *state, int handPos, int *bonus) : cardTest1.c.\n");}

int main () {
    testCardEffectVerifyVillageCardNumActionsIsIncrementedByTwo();
    return 0;
}